import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/Home'
import Main from '@/components/Main'
import Msg from '@/components/Msg'
import My from '@/components/My'
import Homedetails from '@/components/Homedetails'
import Addnote from '@/components/AddNote'
import Login from '@/components/Login'
import Register from '@/components/Register'
import NotFound from '@/components/NotFound'

Vue.use(Router)

export default new Router({
	routes: [
	{
		path: '/',
		component: Main,
		// meta: { keepAlive: true },
		children:[
			{
				path: '/',
				name: 'Home',
				component: Home
			},
			{
				path: '/msg',
				name: 'Msg',
				component: Msg
			},
			{
				path: '/my',
				name: 'My',
				component: My
			}

		]
	},
	{
		path:"*",
		name:"NotFound",
		component:NotFound,
	},
	{
		path:"/login",
		name:"login",
		component:Login,
	},
	{
		path:"/register",
		name:"register",
		component:Register,
	},
	{
		// path:"/details/:id",
		path:"/details",
		name:"homedetails",
		component:Homedetails,
	},
	{
		path:"/addnote",
		name:"addnote",
		component:Addnote
	}

	],
	mode:"history",
	linkActiveClass: "list_active"
})
